#!/tmp/httpd/.cgi-bin/perl

#################################################
# Sends information request to appropriate place
#################################################
#RogueWave

#unshift(@INC, "http://localhost:7999/cgi-bin");
unshift(@INC, "./");
require "cgi-lib";
local(%cgi_params);
&ReadParse(*cgi_params);

$fname = $cgi_params{"FNAME"};
$subject = $cgi_params{"SUBJECT"};
$lname = $cgi_params{"LNAME"};
$title = $cgi_params{"TITLE"};
$company = $cgi_params{"COMPANY"};
$address1 = $cgi_params{"ADDRESS1"};
$address2 = $cgi_params{"ADDRESS2"};
$city = $cgi_params{"CITY"};
$state = $cgi_params{"STATE"};
$zipcode = $cgi_params{"ZIPCODE"};
$telephone = $cgi_params{"TELEPHONE"};
$fax = $cgi_params{"FAX"};
$email = $cgi_params{"EMAIL"};
$tools = $cgi_params{"TOOLS"};
$heap = $cgi_params{"HEAP"};
$booch = $cgi_params{"BOOCH"};
$dbtools = $cgi_params{"DBTOOLS"};
$math = $cgi_params{"MATH"};
$money = $cgi_params{"MONEY"};
$view = $cgi_params{"VIEW"};
$canvas = $cgi_params{"CANVAS"};
$chart = $cgi_params{"CHART"};
$net = $cgi_params{"NET"};
$support = $cgi_params{"SUPPORT"};
$training = $cgi_params{"TRAINING"};
$consulting = $cgi_params{"CONSULTING"};
$windows = $cgi_params{"WINDOWS"};
$windowsnt = $cgi_params{"WINDOWSNT"};
$macintosh = $cgi_params{"MACINTOSH"};
$unix = $cgi_params{"UNIX"};
$whichunix = $cgi_params{"WHICHUNIX"};
$msvisual = $cgi_params{"MSVISUAL"};
$borland = $cgi_params{"BORLAND"};
$othercompiler = $cgi_params{"OTHERCOMPILER"};
$whichcompiler = $cgi_params{"WHICHCOMPILER"};
$database = $cgi_params{"DATABASE"};
$developers = $cgi_params{"DEVELOPERS"};
$programmer = $cgi_params{"PROGRAMMER"};
$teamleader = $cgi_params{"TEAMLEADER"};
$devmanager = $cgi_params{"DEVMANAGER"};
$othermanager = $cgi_params{"OTHERMANAGER"};
$specifymanager = $cgi_params{"SPECIFYMANAGER"};
$deveffort = $cgi_params{"DEVEFFORT"};

	&html_header("Information request confirmation");
	print "<IMG SRC=\"banner.gif\">";
	print "<p>Your request for information has been sent to ";
	print "the appropriate person. We will respond to your ";
	print "request as soon as possible.</p>";
	print "<P>Use the <B>Back</B> function to return to the ";
	print "request form and home page.</P>";
	print "<h3>Thank you for your interest in Rogue Wave.</h3>";
	&html_trailer;

#	&html_header("Information request feedback");
#	print "<p>You entered the following personal information:";
#	print "<pre>   Name:       ", $name, "\n";
#	print "   Title:      ", $title, "\n";
#	print "   Company:    ", $company, "\n";
#	print "   Address:    ", $address1, "\n";
#	print "               ", $address2, "\n";
#	print "   Telephone:  ", $telephone, "\n";
#	print "   Fax:        ", $fax, "\n";
#	print "   Email:      ", $email, "</pre>";
#	print "<p>You made the following information requests:</p>";
#	print "<pre>   Tools.h++:              ", $tools, "\n";
#	print "   Heap.h++:               ", $heap, "\n";
#	print "   Booch Components:       ", $booch, "\n";
#	print "   DBtools.h++:            ", $dbtools, "\n";
#	print "   Math.h++/LAPACK.h++:    ", $math, "\n";
#	print "   Money.h++:              ", $money, "\n";
#	print "   View.h++:               ", $view, "\n";
#	print "   Canvas.h++:             ", $canvas, "\n";
#	print "   Chart.h++:              ", $chart, "\n";
#	print "   Net.h++:                ", $net, "\n\n";
#	print "   Support contracts:      ", $support, "\n";
#	print "   Training information:   ", $training, "\n";
#	print "   Consulting information: ", $consulting, "</pre>";
#	print "<p>You expressed the following statement of needs:</p>";
#	print "<p>", $needs, "</p>";
#	print "<h3>Thank you for your interest in Rogue Wave.</h3>";
#	print "<hr><pre><a href=\"http://cold:8001/~betz/www/index.htm\">Home page</a>   ";
#	print "<a href=\"http://cold:8001/~betz/www/rwpav/products/products.htm\">Product information</a></pre>";
#	&html_trailer;


open(SENDMAIL, "|mail marcs\@snl");
#open(SENDMAIL, "|mail sales\@roguewave.com");
print SENDMAIL <<"eom";
Subject: howdy $subject

This message is from: 
	$fname $lname
	$title
	$company
	$address1
	$address2
	$city $state $zipcode
	$telephone
	$fax
	$email

They have expressed interest in the following products and services:

	On products:
		Tools.h++: $tools
		Heap.h++: $heap
		Booch Components: $booch
		DBtools.h++: $dbtools
		Math.h++/LAPACK.h++: $math
		Money.h++: $money
		View.h++: $view
		Canvas.h++: $canvas
		Chart.h++: $chart
		Net.h++: $net

	On services:
		Support: $support
		Training: $training
		Consulting: $consulting

They have provided the following project information:

	Platforms
		Windows:  $windows
		WindowsNT:  $windowsnt
		Macintosh:  $macintosh
		Unix --- version =  $whichunix

	Compilers
		MS Visual C++:  $msvisual
		Borland C++:  $borland
		Other compiler:  $whichcompiler

	Databases:  $database

	Developers at site:  $developers

	Their position
		Programmer:  $programmer
		Team leader:  $teamleader
		Development manager:  $devmanager
		Other:  $specifymanager

Project Description:

$deveffort
eom
close SENDMAIL;

# Define the beginning of the HTML file.

sub html_header {
	$document_title = $_[0];
	print "Content-type: text/html\n\n";
	print "<html><head>\n";
	print "<title>$document_title</title>\n";
	print "</head>\n";
	print "<body>\n";
	print "<h1>$document_title</h1>\n";
}

# Define the end of the HTML file.

sub html_trailer {
	print "</body>";
	print "</html>";
}
